package com.ctshk.rpc.tour.mapper;

import java.util.List;
import java.util.Map;

import com.ctshk.common.service.mapper.CtsBaseMapper;
import com.ctshk.common.utils.Assist;
import com.ctshk.rpc.tour.entity.SeriesTripTouristType;

/**
 * <p>
 * 系列团旅客类型 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-12
 */
public interface SeriesTripTouristTypeMapper extends CtsBaseMapper<SeriesTripTouristType> {

	/**
	 * 查询行程的旅客类型列表
	 * @param tripId
	 * @return
	 */
	default Map<Long, SeriesTripTouristType> queryMapByTrip(Long tripId) {
		List<SeriesTripTouristType> list = selectListByKey("trip_id", tripId);
		return Assist.forEachToMap(list, SeriesTripTouristType::getId);
	}
}
